package iot.core.data.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import iot.core.data.BaseEntity;
import iot.core.data.IdNameDto;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import javax.naming.Name;
import java.util.Date;
import java.util.List;

@Schema(name = "在线用户表",description = "包含历史")
@TableName("HTUserLogin")
@Data
public class HTUserLogin extends BaseEntity {

    @Schema(name = "Token",description = "")
    @NotBlank(message = "Token不能为空")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  Token ="";

    @Schema(name = "姓名",description = "")
    @NotBlank(message = "姓名不能为空")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  Name ="";

    @Schema(name = "机构编码",description = "")
    private  Long  HTDept_Id =0L;

    @Schema(name = "机构名称",description = "")
    @Size(min =0,max = 100,message = "长度范围0-100")
    private  String  HTDept_Name ="";

    @Schema(name = "角色数据",description = "BaseDto 数组,json格式")
    @Size(min =0,max = 200,message = "长度范围0-200")
    private  String  HTRole_Data ="";

    @Schema(name = "HTRoles",description = "")
    @TableField(exist = false)
    private  List<IdNameDto>  HTRoles ;

    @Schema(name = "平台编号",description = "")
    private  Long  HTPlat_Id =0L;

    @Schema(name = "登录方式",description = "Appver、IMSI")
    @Size(min =0,max = 10,message = "长度范围0-10")
    private  String  LoginWay ="";

    @Schema(name = "额外信息",description = "网站、小程序、安卓终端")
    private  String  Extra ="";

    @Schema(name = "IP",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  IP ="";

    @Schema(name = "OS",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  Os ="";

    @Schema(name = "IMSI",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  IMSI ="";

    @Schema(name = "浏览器",description = "")
    @Size(min =0,max = 50,message = "长度范围0-50")
    private  String  Browser ="";

    @Schema(name = "App版本",description = "")
    @Size(min =0,max = 20,message = "长度范围0-20")
    private  String  Appver ="";

    @Schema(name = "创建日期",description = "")
    private  Date  Crt_DT ;

    @Schema(name = "用户编号",description = "")
    private  Long  Crt_UId =0L;

    @Schema(name = "机构编号",description = "")
    private  Long  Crt_DId =0L;

    @Schema(name = "更新日期",description = "")
    private  Date  Edt_DT ;

    @Schema(name = "更新用户编号",description = "")
    private  Long  Edt_UId =0L;

    @Schema(name = "最近访问地址",description = "")
    @Size(min =0,max = 20,message = "长度范围0-20")
    private  String  Edt_Url ="";

    @Schema(name = "在线状态",description = "")
    private  boolean IsOnline ;

    @Schema(name = "注销日期",description = "")
    private  Date  Logout_DT  ;

    @Schema(name = "注销备注",description = "")
    @Size(min =0,max = 100,message = "长度范围0-100")
    private  String  Logout_Memo ="";

    @Schema(name = "是否调试",description = "")
    private  boolean IsDebug ;



}
